/*
 * @Descripttion: 
import 'package:hzy_common_module/hzy_common_module.dart';
 * @version: 
 * @Author: TT
 * @Date: 2023-03-20 22:04:57
 * @LastEditors: TT
 * @LastEditTime: 2023-03-20 22:21:43
 */

import 'package:flutter/material.dart';
import 'package:hzy_common_module/hzy_common_module.dart';
import '../config/config_index.dart';

class Application extends StatelessWidget {
  Application({Key? key}) : super(key: key);
  final easyLoading = EasyLoading.init();
  @override
  Widget build(BuildContext context) {
    return ScreenUtilInit(
      designSize: const Size(375, 667),
      minTextAdapt: true,
      splitScreenMode: true,
      builder: (content, child) {
        GlobalConfig.initNormalDefault();
        return GetMaterialApp(
          /// 入口路由
          initialRoute: RouterS.configNoramlRouts(),

          /// 所有路由集合
          getPages: RouterS.getAllRoutS(),
          defaultTransition: Transition.noTransition,

          /// 是否显示 导航栏右上角 debug 标识
          debugShowCheckedModeBanner: false,
          builder: (context, child) => MediaQuery(
            /// 设置文字大小不随系统设置改变
            data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0),
            child: easyLoading(context, child),
          ),
        );
      },
    );
  }
}
